<template>
	<view class="combody">
		<view class="head flex-row color303b39 fwbold fz40">
			相关药品
		</view>
		<view class="drugbox">
			<view class="drugcard" v-for="(item,index) in drugList" :key="index" @click="toDrug(item.id)">
				<image :src="$config.baseUrl + item.icon" mode="" style="width: 343rpx;height: 346rpx;"></image>
				<view class="color303b39 fz34 fwbold" style="line-height: 48rpx;padding: 0 16rpx;">
					{{item.name}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['drugList'],
		data() {
			return {

			}
		},
		methods: {
			toDrug(id) {
				uni.navigateTo({
					url: '/pages/knowledge/drugdetail?id=' + id
				})
			},
		}

	}
</script>

<style lang="scss" scoped>
	.combody {
		background: linear-gradient(180deg, #EDFCF9 0%, rgba(237, 252, 249, 0) 100%);
		padding: 40rpx 24rpx 0;
		border-radius: 32rpx;
		margin-top: 16rpx;

		.drugbox {
			margin-top: 40rpx;
			display: flex;
			justify-content: space-between;
			flex-wrap: wrap;

			.drugcard {
				width: 343rpx;
				height: 466rpx;
				background: #fff;
				margin-bottom: 16rpx;
			}
		}
	}
</style>